﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Browse_SeriesByTitle : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        using (PublicCatalogDataContext db = new PublicCatalogDataContext())
        {
            var mySeriesTitle = from a in db.Series
                                join b in db.Provenances on a.ProvenanceId equals b.ProvenanceId
                                orderby a.SeriesTitle ascending
                                select new
                                {
                                    a.SeriesTitle,
                                    b.ProvenanceName,
                                    a.SeriesId,
                                    Title = a.SeriesTitle + " / " + b.ProvenanceName
                                };

            Repeater1.DataSource = mySeriesTitle;
            Repeater1.DataBind();
        }
    }
}
